# coding=utf-8
from framework.base_page import BasePage
#支付管理页面一些操作
class EportsPaymentPage(BasePage):
    btn_add_payment = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[5]/div[2]/div[1]/div/button"
    btn_delete = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[5]/div[2]/div[2]/div/div/div/div/div/table/tbody/tr[1]/td[7]/div/a[2]"
    btn_delete_OK = "xpath=>/html/body/div[2]/div/div/div/div[2]/div/div/div[2]/button[2]"
    btn_edit = "xpath=>//*[@id='root']/div/div/div/div[2]/div/div/div[2]/div/div/div[3]/div/div[3]/div[5]/div[2]/div[2]/div/div/div/div/div/table/tbody/tr[1]/td[7]/div/a[1]"
   
    def click_add_payment(self):
        self.click(self.btn_add_payment)

    def click_delete(self):
        self.click(self.btn_delete)

    def click_delete_OK(self):
        self.click(self.btn_delete_OK)

    def click_edit(self):
        self.click(self.btn_edit)

#添加付款页面
class EportAddPaymentPage(BasePage):
    btn_paymentType = "xpath=>//*[@id='type']/div/div"
    lisType = "xpath=>//ul[@class='ant-select-dropdown-menu  ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical']/li"

    input_Amount = "id=>amount"
    Receipt = "xpath=>/html/body/div[2]/div/div[2]/div/div[2]/div[2]/div[3]/div[2]/div/span/div/div/div/span[1]/div[1]/span/button"
    editReceipt = "xpath=>/html/body/div[3]/div/div[2]/div/div[2]/div[2]/div[3]/div[2]/div/span/div/div/div/span[1]/div[1]/span/button"
    btn_save ="xpath=>/html/body/div[2]/div/div[2]/div/div[2]/div[3]/div/button[2]"

    def click_paymentType(self):
        self.click(self.btn_paymentType)

    def lis_Type(self):
        self.click(self.lisType)

    def type_Amount(self,text):
        self.type(self.input_Amount,text)

    def double_click_Amount(self,text):
        self.double_click(self.input_Amount,text)

    def click_Receipt(self):
        self.click(self.Receipt)

    def click_editReceipt(self):
        self.click(self.editReceipt)

    def click_btn_save(self):
        self.click(self.btn_save)
